package com.vcc.service.service;


import com.mybatisflex.core.paginate.Page;
import com.mybatisflex.core.service.IService;
import com.vcc.data.entity.Role;
import com.vcc.data.entity.WalletDetail;
import com.vcc.service.boss.response.walletDetail.WalletDetailVoBoss;

import java.math.BigDecimal;
import java.util.List;

public interface WalletDetailService extends IService<WalletDetail> {
    List<WalletDetail> listByOrderId(
            String orderId);

    Boolean setCardNumberAndCardNUmberId(
            String orderId,
            String cardNumber,
            Long cardNumberId);

    Page<WalletDetail> paging(
            Page<WalletDetail> pageable,
            Role role,
            Long userId,
            Long targetUserId,
            String cardNumber,
            Integer useFlag,
            String startDate,
            String endDate,
            String remark,
            String orderId);

    Page<WalletDetailVoBoss> paging(
            Page<WalletDetailVoBoss> pageable,
            Long targetUserId,
            String cardNumber,
            Integer useFlag,
            String startDate,
            String endDate,
            String remark,
            Long dealerId);

    Boolean updateStatusByOrderId(
            String orderId
    );

    Boolean updateStatusAndWalletAmountByOrderId(

            BigDecimal walletAmount,
            String orderId);

    Boolean updateStatusAndWalletAmountById(

            BigDecimal walletAmount,
            Long id);


    WalletDetail openCard(
            Long cardTypeId,
            String channel,
            String orderId,
            String remark,
            BigDecimal amount,
            BigDecimal walletAmount,
            Long currencyId,
            Long userId);

    WalletDetail recharge(
            Long userCardId,
            Long cardTypeId,
            String channel,
            String cardNumber,
            String orderId,
            String remark,
            BigDecimal amount,
            BigDecimal walletAmount,
            Long currencyId,
            Long userId);

    WalletDetail rechargeServiceCharge(
            Long userCardId,
            Long cardTypeId,
            String channel,
            String cardNumber,
            String orderId,
            String remark,
            BigDecimal amount,
            BigDecimal walletAmount,
            Long currencyId,
            Long userId);

    WalletDetail out(
            Long userCardId,
            Long cardTypeId,
            String channel,
            String cardNumber,
            String orderId,
            String remark,
            BigDecimal amount,
            BigDecimal walletAmount,

            Long currencyId,
            Long userId);

    WalletDetail accountRecharge(
            String orderId,
            String remark,
            BigDecimal amount,
            BigDecimal walletAmount,
            Long currencyId,
            Long userId);

    WalletDetail accountWithdraw(
            String orderId,
            String remark,
            BigDecimal amount,
            BigDecimal walletAmount,
            Long currencyId,
            Long userId);

    WalletDetail accountOut(
            String orderId,
            String remark,
            BigDecimal amount,
            BigDecimal walletAmount,
            Long currencyId,
            Long userId);


    WalletDetail transferIn(
            String orderId,
            String remark,
            BigDecimal amount,
            BigDecimal walletAmount,
            Long currencyId,
            Long userId);

    WalletDetail transferOut(
            String orderId,
            String remark,
            BigDecimal amount,
            BigDecimal walletAmount,
            Long currencyId,
            Long userId);

    WalletDetail accountRegulation(
            String orderId,
            String remark,
            BigDecimal amount,
            BigDecimal walletAmount,
            Long currencyId,
            Long userId,
            Boolean hasTransferIn);

    WalletDetail cardRegulation(
            String orderId,
            String remark,
            BigDecimal amount,
            BigDecimal walletAmount,
            Long currencyId,
            Long userId,
            Boolean hasTransferIn);

    WalletDetail authFee(
            Long userCardId,
            Long cardTypeId,
            String channel,
            String cardNumber,
            String orderId,
            String remark,
            BigDecimal amount,
            BigDecimal walletAmount,
            Long currencyId,
            Long userId);

    WalletDetail authMinFee(
            Long userCardId,
            Long cardTypeId,
            String channel,
            String cardNumber,
            String orderId,
            String remark,
            BigDecimal amount,
            BigDecimal walletAmount,
            Long currencyId,
            Long userId);

    WalletDetail failFee(
            Long userCardId,
            Long cardTypeId,
            String channel,
            String cardNumber,
            String orderId,
            String remark,
            BigDecimal amount,
            BigDecimal walletAmount,
            Long currencyId,
            Long userId);

    WalletDetail reversalFee(
            Long userCardId,
            Long cardTypeId,
            String channel,
            String cardNumber,
            String orderId,
            String remark,
            BigDecimal amount,
            BigDecimal walletAmount,
            Long currencyId,
            Long userId);

    WalletDetail refundFee(
            Long userCardId,
            Long cardTypeId,
            String channel,
            String cardNumber,
            String orderId,
            String remark,
            BigDecimal amount,
            BigDecimal walletAmount,
            Long currencyId,
            Long userId);

    WalletDetail crossBorderFee(
            Long userCardId,
            Long cardTypeId,
            String channel,
            String cardNumber,
            String orderId,
            String remark,
            BigDecimal amount,
            BigDecimal walletAmount,
            Long currencyId,
            Long userId);

    WalletDetail shareAccountRecharge(
            Long shareAccountId,
            String orderId,
            String remark,
            BigDecimal amount,
            BigDecimal walletAmount,
            Long currencyId,
            Long userId);

    WalletDetail shareAccountWithdraw(
            Long shareAccountId,
            String orderId,
            String remark,
            BigDecimal amount,
            BigDecimal walletAmount,
            Long currencyId,
            Long userId);


    BigDecimal sumAmountByUserId(
            Long userId,
            Integer useFlag
    );

}
